<script type="text/javascript">
    $(document).ready(function (e) {
        dialog('.webNodeParentSet', {
            autoOpen: false,
            modal: true,
            title: "选择父级栏目",
            minWidth: 500,
            maxHeight: 400
        });
        LC.S.id = '${webNode._id}';
        LC.S.edit('.webNodeDetail .edit', LC.S.serviceUrl + LC.S.URL_UPDATE, '${webNode._id}');
        LC.S.changeParent = function (e) {
            if ($('.webNodeParentSet').attr('none') != undefined) {
                $('.webNodeParentSet').removeAttr('none');
                $('.webNodeParentSet').load(LC.S.serviceUrl + '/parent.do?id=' + LC.S.id, function () {
                    $('.webNodeParentSet').dialog('open');
                });
            } else {
                $('.webNodeParentSet').dialog('open');
            }
        };
        $('.webNodeDetail .webNodeLocation').click(LC.S.changeParent);
        var parentSet = $('<span class="icon-edit"></span>').click(LC.S.changeParent);
        $('.webNodeLocation').after(parentSet);
    });
</script>
<div class="panel panel-default">
    <div class="panel-heading">栏目详情</div>
    <div class="panel-body form-horizontal webNodeDetail">
        <input type="hidden" name="webNodeId" value="${webNode._id}">
        <div class="form-group">
            <label class="col-sm-2 control-label">编 号：</label>
            <div class="col-sm-8"><p class="webNodeId form-control-static">${webNode._id}</p></div>
        </div>
        <div class="form-group">
            <label class="col-sm-2 control-label">名 称：</label>
            <div class="col-sm-4">
                <p class="form-control-static edit" etype="text" regx="${check.name}" name="name">${webNode.name}</p>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-2 control-label">位 置：</label>
            <div class="col-sm-8">
                <ol class="webNodeLocation breadcrumb">
                    <li>顶级</li>
                <#list parents as parent><li>${parent.name}</li></#list>
                </ol>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-2 control-label">地 址：</label>
            <div class="col-sm-8">
                <p class="form-control-static edit" etype="text" regx="${check.url}" name="url">${webNode.url}</p>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-2 control-label">优先级：</label>
            <div class="col-sm-3">
                <p class="form-control-static edit" etype="number" regx="${check.index}" name="index">${webNode.index}</p>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-2 control-label">类　型：</label>
            <div class="col-sm-4">
                <p class="form-control-static edit" etype="dselect" edid="12" name="type">${dict(12,webNode.type)}</p>
            </div>
        </div>
        <div class="webNodeParentSet" none>
            <img class="loading-img" src="images/loading.gif"/>
        </div>
        <div class="form-group">
            <label class="col-sm-2 control-label">列表显示：</label>
            <div class="col-sm-4">
                <p class="form-control-static edit" etype="dselect" edid="1" name="list">${dict(1,webNode.list)!""}</p>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-2 control-label">key：</label>
            <div class="col-sm-4">
                <p class="form-control-static edit" etype="text" regx="${check.key}" name="key">${webNode.key}</p>
            </div>
        </div>
    </div>
</div>